<script setup>
import { loginApi } from '@/api/index'
import { reactive } from 'vue';
import { useUserToken } from '@/store/module/user'
const userStore = useUserToken()

const from = reactive({
    account: 'shenlingadmin',
    password: '123456'
})
const submitLogin = async () => {
    console.log('点击登录')
    const res = await loginApi(from)
    console.log(res);
}
 </script>

 <template>
    <div>{{userStore.getUserToken}}</div>
     <button @click="userStore.setUserToken('eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjEwMCIsImlhdCI6MTY3OTczMjQ1MSwiZXhwIjoxNjc5OTA1MjUxfQ.9S7cJ0TQCUnwgY5wHjnE8EaHz75i4aCblyNJK5zRu9A')">
         录入
       </button>
       <button @click="userStore.delUserToken()">退出</button>
    <div>
        这是调度管理 transport  下的运输管理 transport-task
    </div>
    <button @click="submitLogin">测试</button>
 </template>